Just use the directory name for the home dir. (#325817, Federico Mena
authorMatthias Clasen <mclasen@redhat.com>
Fri, 6 Jan 2006 21:49:59 +0000 (21:49 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 6 Jan 2006 21:49:59 +0000 (21:49 +0000)
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
directory name for the home dir.  (#325817, Federico Mena Quintero)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilechooserbutton.c

index 98ad383160c37d70967f96d856fdb21c3b6d9866..a7bc2bf5278b49a04b4690fef2fff4a2c6eb80f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-01-06  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkfilechooserbutton.c (model_add_special): Just use the
+       directory name for the home dir.  (#325817, Federico Mena Quintero)
+       
        * gtk/gtktexttag.c (gtk_text_attributes_new): Initialize editable 
        to TRUE. 
        (gtk_text_tag_class_init): The default value for the direction 
index 98ad383160c37d70967f96d856fdb21c3b6d9866..a7bc2bf5278b49a04b4690fef2fff4a2c6eb80f6 100644 (file)
@@ -1,5 +1,8 @@
 2006-01-06  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkfilechooserbutton.c (model_add_special): Just use the
+       directory name for the home dir.  (#325817, Federico Mena Quintero)
+       
        * gtk/gtktexttag.c (gtk_text_attributes_new): Initialize editable 
        to TRUE. 
        (gtk_text_tag_class_init): The default value for the direction 
index ed8472d31557ba25138a763a269a176827492864..18c3d97fcf4f4c70f13c03b4f5e1d37cbecab0b1 100644 (file)
@@ -65,7 +65,6 @@
 #define GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_FILE_CHOOSER_BUTTON, GtkFileChooserButtonPrivate))
 
 #define DEFAULT_TITLE          N_("Select A File")
-#define HOME_DISPLAY_NAME      N_("Home")
 #define DESKTOP_DISPLAY_NAME   N_("Desktop")
 #define FALLBACK_DISPLAY_NAME  N_("(None)")
 #define FALLBACK_ICON_NAME     "stock_unknown"
@@ -1331,6 +1330,7 @@ static inline void
 model_add_special (GtkFileChooserButton *button)
 {
   const gchar *homedir;
+  const gchar *display_name;
   gchar *desktopdir = NULL;
   GtkListStore *store;
   GtkTreeIter iter;
@@ -1346,6 +1346,7 @@ model_add_special (GtkFileChooserButton *button)
   if (homedir)
     {
       path = gtk_file_system_filename_to_path (button->priv->fs, homedir);
+      display_name = get_display_name_for_path (button->priv->fs, path);
       pixbuf = gtk_file_system_render_icon (button->priv->fs, path,
                                            GTK_WIDGET (button),
                                            button->priv->icon_size, NULL);
@@ -1353,7 +1354,7 @@ model_add_special (GtkFileChooserButton *button)
       pos++;
       gtk_list_store_set (store, &iter,
                          ICON_COLUMN, pixbuf,
-                         DISPLAY_NAME_COLUMN, _(HOME_DISPLAY_NAME),
+                         DISPLAY_NAME_COLUMN, display_name,
                          TYPE_COLUMN, ROW_TYPE_SPECIAL,
                          DATA_COLUMN, path,
                          -1);